package com.wudl.core;

import org.apache.flink.streaming.api.scala.DataStream;
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment;

/**
 * @ClassName : SourceFile
 * @Description : 读取文件
 * @Author :wudl
 * @Date: 2020-10-22 00:34
 */

public class SourceFile {
    public static void main(String[] args) {

        // 获取上下文的环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStream<String> dataStream = env.readTextFile("D:\\ideaWorkSpace\\learning\\Flinklearning\\wudl-flink-java\\src\\main\\java\\com\\wudl\\core\\SourceFile.java");

        dataStream.print();
        env.execute();


    }
}
